#
# Copyright (c) 2020 INESC TEC <https://www.inesctec.pt>
#
# This Source Code Form is subject to the terms of the European Union
# Public License, v. 1.2. If a copy of the EUPL was not distributed with
# this file, You can obtain one at https://opensource.org/licenses/EUPL-1.2.
#
# SPDX-License-Identifier: EUPL-1.2
#

platform :ios, '12.0'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

project 'Divoc',
        'ProductionDebug' => :debug,
        'ProductionStaging' => :release,
        'ProductionRelease' => :release,
        'UiDebug' => :debug,
        'UiStaging' => :release,
        'UiRelease' => :release

target 'Divoc' do
  config = use_native_modules!
  use_react_native!(:path => config["reactNativePath"])

  pod 'TrustKit', '~> 1.6'

  # Permissions
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end
end
